package cn.bugstack.springframework.beans.factory.support;

import cn.bugstack.springframework.core.io.DefaultResourceLoader;
import cn.bugstack.springframework.core.io.ResourceLoader;


/**
 * @author ouyangzhao
 */
public abstract class AbstractBeanDefinitionReader implements BeanDefinitionReader{

    private final BeanDefinitionRegistry registry;

    private ResourceLoader resourceLoader;

    protected AbstractBeanDefinitionReader(BeanDefinitionRegistry registry, ResourceLoader resourceLoader) {
        this.registry = registry;
        this.resourceLoader = resourceLoader;
    }

    public AbstractBeanDefinitionReader(BeanDefinitionRegistry registry){
       this(registry,new DefaultResourceLoader());

    }



    @Override
    public BeanDefinitionRegistry getRegistry(){
        return registry;
    }

    @Override
    public ResourceLoader getResourceLoader(){
        return resourceLoader;
    }




}
